import service from '@/utils/request'

export const unitBuilding = (id) => {
  return service({
    url: `/manager/unit/building/${id}`,
    method: 'get'
  })
}

export const unitBaseInfo = (id) => {
  return service({
    url: `/manager/unit/base/info/${id}`,
    method: 'get'
  })
}

export const unitEmployee = (params) => {
  return service({
    url: '/manager/unit/employee',
    method: 'get',
    params
  })
}

export const unitLedger = (params) => {
  return service({
    url: '/manager/unit/ledger',
    method: 'get',
    params
  })
}

export const unitRoomArea = (unitId,id) => {
  return service({
    url: `/manager/unit/room/area/${unitId}/${id}`,
    method: 'get'
  })
}

export const unitRoomEmployee = (params) => {
  return service({
    url: '/manager/unit/room/employee',
    method: 'get',
    params
  })
}

export const unitRoomExceed = (id) => {
  return service({
    url: `/manager/unit/room/exceed/${id}`,
    method: 'get'
  })
}

export const unitRoom = (id) => {
  return service({
    url: `/manager/unit/room/${id}`,
    method: 'get'
  })
}

export const unitStaff = (id) => {
  return service({
    url: `/manager/unit/staff/${id}`,
    method: 'get'
  })
}

export const buildingLease = (params) => {
  return service({
    url: '/manager/unit/building/lease',
    method: 'get',
    params
  })
}

export const buildingProperty = (params) => {
  return service({
    url: '/manager/unit/building/property',
    method: 'get',
    params
  })
}

export const ownershipTotal = (params) => {
  return service({
    url: '/manager/unit/building/ownership/total',
    method: 'get',
    params
  })
}

export const ownershipList = (params) => {
  return service({
    url: '/manager/unit/building/ownership',
    method: 'get',
    params
  })
}

export const roomSvg = (id) => {
  return service({
    url: `/manager/unit/room/svg/${id}`,
    method: 'post'
  })
}

export const roomSvgBand = (data) => {
  return service({
    url: '/manager/unit/building/room/svg/band',
    method: 'post',
    data
  })
}

export const svgBandCancel = (data) => {
  return service({
    url: '/manager/unit/building/room/svg/band/cancel',
    method: 'post',
    data
  })
}

export const svgDragPosition = (data) => {
  return service({
    url: '/manager/unit/building/room/svg/drag/position',
    method: 'post',
    data
  })
}

export const svgSetFont = (data) => {
  return service({
    url: '/manager/unit/building/room/svg/set/font',
    method: 'post',
    data
  })
}

export const roomSvgSave = (data) => {
  return service({
    url: '/manager/unit/building/room/svg/save',
    method: 'post',
    data
  })
}

